package com.fowo.api.model.purchase.change.order.product;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.excel.ImageConvert;
import com.fowo.api.common.validator.EnumsString;
import com.fowo.api.sys.entity.SysFile;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 变更单子表 导入导出辅助模型 */
@Getter
@Setter
public class PurchaseChangeOrderProductExcelPo {

  @Size(max = 50, message = "图片长度不能超过20")
  @ExcelProperty(value = "图片", converter = ImageConvert.class)
  private List<SysFile> imgs;

  @EnumsString(
    value = { "已变更" },
    message = "业务标识的可用值为 “已变更” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "业务标识")
  private String businessIdent;

  @Size(max = 50, message = "品名长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "品名")
  private String productIdName;

  @ExcelIgnore
  @ExcelProperty(value = "品名")
  private Long productId;

  @Size(max = 50, message = "SKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "SKU")
  private String sku;

  @Size(max = 50, message = "店铺长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "店铺")
  private String sidShopName;

  @ExcelIgnore
  @ExcelProperty(value = "店铺")
  private Long sid;

  @Size(max = 50, message = "MSKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "MSKU")
  private String msku;

  @Size(max = 50, message = "FNSKU长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "FNSKU")
  private String fnskuFnsku;

  @ExcelIgnore
  @ExcelProperty(value = "FNSKU")
  private Long fnsku;

  @ExcelProperty(value = "原采购数量")
  private Long originalApplicationNum;

  @Size(max = 50, message = "采购量长度不能超过20")
  @ExcelProperty(value = "采购量")
  private Integer applicationNum;

  @ExcelProperty(value = "原单价")
  private java.math.BigDecimal originalUnitPrice;

  @Size(max = 50, message = "单价长度不能超过20")
  @ExcelProperty(value = "单价")
  private java.math.BigDecimal unitPrice;

  @ExcelProperty(value = "成本价格")
  private java.math.BigDecimal costPrice;

  @ExcelProperty(value = "主材料单价")
  private java.math.BigDecimal mainUnitPrice;

  @ExcelProperty(value = "主材料克重")
  private java.math.BigDecimal gramWeight;

  @ExcelProperty(value = "工费")
  private java.math.BigDecimal laborCosts;

  @ExcelProperty(value = "辅料")
  private java.math.BigDecimal accessoriesPrice;

  @ExcelProperty(value = "损耗%")
  private java.math.BigDecimal materialloss;

  @ExcelProperty(value = "包装")
  private java.math.BigDecimal materialpack;

  @ExcelProperty(value = "ERP价格")
  private java.math.BigDecimal erpprice;

  @ExcelProperty(value = "含税单价")
  private java.math.BigDecimal taxPrice;

  @NumberFormat("0.00")
  @ExcelProperty(value = "原金额")
  private java.math.BigDecimal originalTotalPrice;

  @NumberFormat("0.00")
  @ExcelProperty(value = "金额")
  private java.math.BigDecimal totalPrice;

  @ExcelProperty(value = "价税合计")
  private java.math.BigDecimal priceAmount;

  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "预计到货日期")
  private java.util.Date expectArriveTime;

  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "所属变更单")
  private String parentPurchaseChangeOrderOrderSn;

  @ExcelIgnore
  @ExcelProperty(value = "所属变更单")
  private Long parentPurchaseChangeOrder;

  @Size(max = 200, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
